package com.ytjj.qmyx.admin.eunm;

import lombok.Getter;

/**
 * @Description TODO
 * @ClassName DateTypeConstant
 *
 *
 * @Version 1.0
 **/
@Getter
public enum DateTypeEnums {

    DAY(24),
    WEEK(7),
    MONTH(30),
    TIME(null)
    ;
    Integer dayNum;

    DateTypeEnums(Integer dayNum){
        this.dayNum = dayNum;
    }

    public static Integer getDateDayNum(String name) {
        DateTypeEnums[] DateTypeEnumsList = DateTypeEnums.values();
        for (DateTypeEnums dateTypeEnums : DateTypeEnumsList) {
            if (dateTypeEnums.name().equals(name)) {
                return dateTypeEnums.getDayNum();
            }
        }
        return null;
    }
}
